import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login'
import Main from '@/views/main'
import Filedownload from '@/views/Filedownload'
import Application from '@/views/applicationManagement/application'
import Institution from '@/views/institutionManagement/institution'
import Permission from '@/views/permissionManagement/permission'
import Roles from '@/views/rolesManagement/roles'
import UserAdd from '@/views/userManagement/userAdd'
import UserEdit from '@/views/userManagement/userEdit'
import UserList from '@/views/userManagement/userList'

Vue.use(Router)

export default new Router({
  
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login
    },
    {
      path:'/main',
      component:Main,
      children:[
        {path:'/userList',component:UserList},
        {path:'/userAdd',component:UserAdd},
        {path:'/userEdit/:id',component:UserEdit},
        {path:'/institution',component:Institution},
        {path:'/filedownload',component:Filedownload},
        {path:'/roles',component:Roles},
        {path:'/permission',component:Permission},
        {path:'/application',component:Application}
      ],
      redirect:'/userList'
    }
  ]
})
